package cn.tqfeiyang.smartadmin.business.organization.mapper;

import cn.tqfeiyang.smartadmin.business.organization.entity.EmployeeEntity;
import cn.tqfeiyang.smartadmin.business.organization.entity.EmployeeRoleEntity;
import cn.tqfeiyang.smartadmin.commons.mybatis.MPBaseMapper;
import cn.tqfeiyang.smartadmin.system.response.RoleQueryVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * 员工/角色映射接口
 *
 * @author tqfeiyang
 * @since 2024-09-19
 */
@Mapper
public interface EmployeeRoleMapper extends MPBaseMapper<EmployeeRoleEntity> {

    List<RoleQueryVO> getRoleQueryVOList(Long employeeId);

    List<Long> getRoleIdsByEmployeeId(Long employeeId);

    void assignRoleIdsByEmployeeId(Long employeeId, List<Long> roleIds);

    void deleteRoleIdsByEmployeeId(Long employeeId, List<Long> roleIds);

    void clearRoleIdsByEmployeeId(Long employeeId);

}
